package com.greyu.ysj.mapper;

import com.greyu.ysj.entity.CbtCoininfo;
import com.greyu.ysj.entity.CbtCoininfoExample;
import com.greyu.ysj.entity.CbtInvest;
import com.greyu.ysj.entity.CbtRecharge;

import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface CbtCoininfoMapper {
    long countByExample(CbtCoininfoExample example);

    int deleteByExample(CbtCoininfoExample example);

    int deleteByPrimaryKey(Integer coinId);

    int insert(CbtCoininfo record);

    int insertSelective(CbtCoininfo record);

    List<CbtCoininfo> selectByExample(CbtCoininfoExample example);

    CbtCoininfo selectByPrimaryKey(Integer coinId);

    int updateByExampleSelective(@Param("record") CbtCoininfo record, @Param("example") CbtCoininfoExample example);

    int updateByExample(@Param("record") CbtCoininfo record, @Param("example") CbtCoininfoExample example);

    int updateByPrimaryKeySelective(CbtCoininfo record);

    int updateByPrimaryKey(CbtCoininfo record);
    
    //*******************************************
    //用户充值
    List<CbtCoininfo> selectCoinListByUserId(Integer userId);
    
    int selectCoinCount();
    //用户充值记录
    List<CbtCoininfo> selectRechargeRecordByuserId(Integer userId,Integer coinId);
    //用户投资记录
    List<CbtCoininfo> selectInvestRecordByuserId(Integer userId);
    //
    String selectCoinLocationBycoinId(Integer coinId);
    //
    int countRechargeRecord(Integer userId, Integer coinId);
    
}